﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using System.Data;

namespace DAO
{
    public class HoaDonDAO
    {
        public static DataTable Themhoadon(HoaDonDTO hd)
        {
            string sql = string.Format("insert into HOADON(MADM,NVLAP,NGAYLAP,TONGTIEN) values('{0}','{1}','{2}','{3}')  SELECT SCOPE_IDENTITY() as ID", hd.Madatmon, hd.Nguoilap,hd.Ngaylap, hd.Tongtien);
            return DataProvider.ExcuteQuery(sql);
        }
        public static DataTable ListHoaDon()
        {
            string sql = string.Format("select * from HOADON");
            return DataProvider.ExcuteQuery(sql);
        }
    }
}
